import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import { Outlet } from '@umijs/max';
import './layout.less';

const WorksLayout: React.FC = () => {
  return (
    <ConfigProvider 
      locale={zhCN}
      theme={{
        components: {
          Form: {
            labelRequiredMarkColor: '#ff4d4f',
            labelColor: 'rgba(0, 0, 0, 0.88)',
            labelFontSize: 14,
          },
        },
      }}
      form={{ 
        requiredMark: true,
        colon: true,
        scrollToFirstError: true,
        validateMessages: {
          required: '${label}是必填项',
        },
      }}
    >
      <Outlet />
    </ConfigProvider>
  );
};

export default WorksLayout; 